package com.baidu.netdisk;

import org.json.JSONObject;

public class BaiduListFileInfo {

	private String mFileName;
	private int mCategory;
	private long mFsId;
	private boolean mDirEmpty;

	private long mServerCreateTime;
	private long mServerModifyTime;
	private long mLocalCreateTime;
	private long mLocalModifyTime;

	private long mSize;
	private boolean mIsDir;
	private boolean mPath;
	private boolean mIsEmpty;

	BaiduListFileInfo(JSONObject obj) {
		if (obj == null) {
			return;
		}
		
		mFileName = obj.optString("server_filename");
		mCategory = obj.optInt("category");
		mFsId = obj.optLong("fs_id");
		mDirEmpty = obj.optBoolean("dir_empty");
		mServerCreateTime = obj.optLong("server_ctime");
		mServerModifyTime = obj.optLong("server_mtime");
		mLocalCreateTime = obj.optLong("local_ctime");
		mLocalModifyTime = obj.optLong("local_mtime");

		mSize = obj.optLong("size");
		mIsDir = obj.optBoolean("isdir");
		mPath = obj.optBoolean("path");
		mIsEmpty = obj.optBoolean("empty");
	}

	public String getFileName() {
		return mFileName;
	}

	public int mCategory() {
		return mCategory;
	}

	public long getFsId() {
		return mFsId;
	}

	public boolean getDirEmpty() {
		return mDirEmpty;
	}

	public long getServerCreateTime() {
		return mServerCreateTime;
	}

	public long getServerModifyTime() {
		return mServerModifyTime;
	}

	public long getLocalCreateTime() {
		return mLocalCreateTime;
	}

	public long getLocalModifyTime() {
		return mLocalModifyTime;
	}

	public long mSize() {
		return mSize;
	}

	public boolean mIsDir() {
		return mIsDir;
	}

	public boolean mPath() {
		return mPath;
	}

	public boolean mIsEmpty() {
		return mIsEmpty;
	}

}
